<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
        // 上午作业 2.判断一个数字是奇数还是偶数
        var num = +prompt("输入数字");
        if(num % 2 === 0){
            console.log(num + "是偶数")
        }else {
            console.log(num + "是奇数");
        }
    </script>
</body>
</html>